//
//  MKUIElementViewTextInput.h
//  MKUI
//  点击输入字符串
//  Created by 苏尚进 on 2023/7/13.
//  Copyright © 2023 moon. All rights reserved.
//

#import "MKUIElementViewDetail.h"

NS_ASSUME_NONNULL_BEGIN
@interface MKUIElementViewTextInput : MKUIElementViewDetail
@property(nonatomic,assign) BOOL allowsMultipleLineText;//是否允许输入多行
@property(nonatomic,strong,nullable) NSString *text;//输入的文本
@property(nonatomic,strong,nullable) NSString *placeholder;//没有文本时的占位符
@property(nonatomic,strong,nullable) NSString *doneButtonText;//完成按钮字符串
@property(nonatomic,copy,nullable) NSString *(^whenChange)(__kindof MKUIElementViewTextInput *el,NSString *text);//输入文本变更时的回调
@property(nonatomic,copy,nullable) void(^whenDone)(__kindof MKUIElementViewTextInput *el);//输入文本变更时的回调
- (void)beginTextInput;//开始进行输入
@end
NS_ASSUME_NONNULL_END

NS_ASSUME_NONNULL_BEGIN
@interface MKUIElementListViewCellTextInput : MKUIElementListViewCellBase
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-property-synthesis"
@property(nonatomic,readonly,nullable) __kindof MKUIElementViewTextInput *elementView;
#pragma clang diagnostic pop
@end
NS_ASSUME_NONNULL_END

NS_ASSUME_NONNULL_BEGIN
@interface MKUIElementTableViewCellModelTextInput : MKUIElementTableViewCellModelDetail
@property(nonatomic,assign) BOOL el_allowsMultipleLineText;//是否允许输入多行
@property(nonatomic,strong,nullable) NSString *el_text;//输入的文本
@property(nonatomic,strong,nullable) NSString *el_placeholder;//没有文本时的占位符
@property(nonatomic,strong,nullable) NSString *el_doneButtonText;//完成按钮字符串
@property(nonatomic,copy,nullable) NSString *(^el_whenChange)(__kindof MKUIElementTableViewCellModelTextInput *cm,NSString *text);//输入文本变更时的回调
@property(nonatomic,copy,nullable) void(^el_whenDone)(__kindof MKUIElementTableViewCellModelTextInput *cm);//输入文本变更时的回调
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-property-synthesis"
@property(nonatomic,readonly,nullable) __kindof MKUIElementViewTextInput *el_elementView;
#pragma clang diagnostic pop
@end

@interface MKUIElementTableViewCellTextInput : MKUIElementTableViewCellDetail
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-property-synthesis"
@property(nonatomic,readonly,nullable) __kindof MKUIElementViewTextInput *elementView;
#pragma clang diagnostic pop
- (void)beginTextInput;//开始进行输入
@end
NS_ASSUME_NONNULL_END
